<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Universum.Views.Resource.ResourceViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Universum - Resources: Create a new file
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	
	<%= Html.ValidationSummary("Create was unsuccessful. Please correct the errors and try again.") %>
	<% using (Html.BeginForm<ResourceController>(c => c.CreateFile(Model.UserPath), FormMethod.Post, new { enctype = "multipart/form-data" }))
	{%>
	
	<fieldset>
		<legend>Fields</legend>
		<p>
			<label for="ResourceFile">
				Owner:</label>
			<input type="file" name="resourceFile" />
			<%= Html.ValidationMessage("Owner", "*")%>
			<input type="hidden" name="toFolder" value="<%=Model.UserPath %>" />
			<input type="submit" value="Upload" />
		</p>
	</fieldset>
	<% } %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptPlaceHolder" runat="server">
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Breadcrumbs" runat="server">
<%= Html.Breadcrumb().Home().Append<ResourceController>(it=>it.Index(""),"Resources").AppendText("Create a new file").End() %>
</asp:Content>
